{layout name="layout" /}
	{literal}
	<style type="text/css">
		#table tr td{border: 1px solid #151515;cellspacing:0;cellpadding:0;}
		table {
			cellspacing:0,
		 	cellpadding:0;}
	</style>
	{/literal}
	<div>
		<table id='table' align="center" style="border: 1px solid #151515;cellspacing:0;cellpadding:0; ">
			<tr>
				<td>描述</td>
				<td>周期数</td>
				<td>周期类型</td>
				<td>最大执行次数</td>
				<td>财富</td>
				<td>威望</td>
				<td>积分</td>
				<td>操作</td>
			</tr>
		{foreach $data as $item}
			<tr>
				<td>{$item.envet_descript}</td>
				<td>{$item.cycle_num}</td>
				<td>{$item.description}</td>
				<td>{$item.cycle_count}</td>
				<td>{$item.wealth}</td>
				<td>{$item.prestige}</td>
				<td>{$item.point}</td>
				<td><a href="{:url('/admin/event/editEvent/id/' . $item.id)}">修改</a></td>
			</tr>
		{/foreach}
		</table>
		<!--<div align="right">
			<input type="button" name="" value="添加" onclick="add()" style="width: 80px;">
		</div>-->
	</div>

	<div id='add' style="display: none">
		<div align="right">
			<input type="button" name="" value="取消" onclick="cancel()" style="width: 80px;">
		</div>
		<form action="{:url('admin/event/add')}" method="post">
			<table align="center">
				<tr>
					<td>描述</td>
					<td><input type="text" name="envet_descript"></td>
				</tr>
				<tr>
					<td>周期天数</td>
					<td>	<input type="text" name="cycle_days"></td>
				</tr>
				<tr>
					<td>次数</td>
					<td><input type="text" name="cycle_count"></td>
				</tr>
				<tr>
					<td>开始时间</td>
					<td><input type="text" name="start_time"></td>
				</tr>
				<tr>
					<td>结束时间</td>
					<td><input type="text" name="end_time"></td>
				</tr>
				<tr>
					<td>行为</td>
					<td><input type="text" name="envet_name"></td>
				</tr>
			</table>
			<span>财富</span>  	<input type="text" name="wealth" style="width:50px;">	     <br />
			<span>威望</span> 	<input type="text" name="prestige" style="width:50px;">		 <br />
			<span>积分</span>	<input type="text" name="point" style="width:50px;">		 <br />
			<input type="submit" name="" value="提交">			
		</form>
	</div>

	{literal}
	<script type="text/javascript">
		function add()
		{
			$('#add').slideDown(500);
		}

		function cancel()
		{
			$('#add').slideUp(500);
		}
	</script>
	{/literal}